﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace AspNetCoreAbp.Controllers;

[ApiController]
[Route("api/[controller]")]
public class HomeController : ControllerBase
{
    private readonly ILogger<HomeController> _logger;

    public HomeController(ILogger<HomeController> logger)
    {
        _logger = logger;
    }

    [HttpGet]
    public int Get()
    {
        _logger.LogInformation("TEST1");
        _logger.LogWarning("TEST2");
        _logger.LogError("TEST3");

        return 0;
    }

    [HttpGet("auth")]
    [Authorize]
    public int GetValue()
    {
        return 0;
    }
}